<?php
include("connection/connection.php");
$asset_id=$_REQUEST['var'];
$str=$_REQUEST['str'];
$reference_id=$_REQUEST['referenceId'];
$qrSource="select * from tbl_dtls_q1_asset where id='$asset_id' and asset_id LIKE '$str%' order by 0+replace(asset_id,'Sub','')";
		$resSource=mysql_query($qrSource);
		$rowSource=mysql_fetch_array($resSource);
?>
<script type="text/javascript" src="js/jquery.js"></script>
 <div class="section_format">
  <form action="assetrwss_edit.php" method="post" name="sec5" id="sec5" onSubmit="return sec5_val();">
  <div style="height:30px" align="center"><?php echo $reference_id;?></div>
  <table border="1">
    
    <tr>
      <td colspan="2">&nbsp;<b><?php echo $str;?></b></td>
      </tr>
   
      <tr>
        <td>&nbsp;<b>Location</b></td>
        <td>&nbsp;
            <input type="text" name="Location" id="Location" value="<?php echo $rowSource['asset_location']; ?>"  />         </td>
      </tr>
	  <tr>
        <td>&nbsp;<b>Latitude</b></td>
        <td>&nbsp;
            <input type="text" name="Latitude" id="Latitude" value="<?php echo $rowSource['asset_longitude']; ?>" onBlur="float1(this,67,80);" /></td>
      </tr>
      <tr>
        <td>&nbsp;<b>Longitude</b></td>
        <td>&nbsp;
            <input type="text" name="Longitude" id="Longitude" value="<?php echo $rowSource['asset_latitude']; ?>" onBlur="float1(this,20,32);"  /></td>
      </tr>
      
      
      <td width="400">&nbsp;<b>Status</b></td>
      <td width="400">&nbsp;
	  
	  <select name="Status" id="Status">
	  <option value="operational" <?php if($rowSource['asset_status']=="operational"){ echo "selected";}else{ echo "";}?>>Operational</option>
	  <option value="nonoperational" <?php if($rowSource['asset_status']=="nonoperational"){ echo "selected";}else{ echo "";}?>>Non Operational</option>
	   <option value="standby" <?php if($rowSource['asset_status']=="standby"){ echo "selected";}else{ echo "";}?>>Standby</option>
	  </select>
	  <input type="hidden" id="asset_id" name="asset_id" value="<?php echo $asset_id; ?>"><input type="hidden" id="str" name="str" value="<?php echo $str; ?>"></td>
      </tr>
    
    <tr>
      <td>&nbsp;<b>Discharge (lpm)</b></td>
      <td> &nbsp;
        <input type="text" name="Discharge" id="Discharge" value="<?php echo "$rowSource[asset_discharge]";?>"  /></td>
      </tr>
	  
	  <tr>
      <td>&nbsp;<b>Head (m)</b></td>
      <td>&nbsp; <input type="text" name="Head" id="Head" value="<?php echo "$rowSource[asset_head]";?>"  /></td>
      </tr>
	  <tr>
      <td>&nbsp;<b>Power Rating (in HP)</b></td>
      <td> &nbsp;
        <input type="text" name="Power" id="Power" value="<?php echo "$rowSource[asset_power]";?>" /></td>
      </tr>
	  <!--
	  <tr>
        <td>&nbsp;<b>pH</b></td>
	    <td>&nbsp;
	        <input type="text" name="pH" id="pH" value="<?php echo $rowSource['asset_ph']; ?>" /></td>
      </tr>
	  <tr>
        <td>&nbsp;<b>TDS (mg/l)</b></td>
	    <td>&nbsp;
	        <input type="text" name="TDS" id="TDS" value="<?php echo $rowSource['asset_tds']; ?>" /></td>
      </tr>
	  <tr>
        <td>&nbsp;<b>cl (mg/l)</b></td>
	    <td>&nbsp;
	        <input type="text" name="cl" id="cl" value="<?php echo $rowSource['asset_cl']; ?>" /></td>
      </tr>
	  <tr>
        <td>&nbsp;<b>F (mg/l)</b></td>
	    <td>&nbsp;
	        <input type="text" name="F" id="F" value="<?php echo $rowSource['asset_f']; ?>" /></td>
      </tr>
	  <tr>
        <td>&nbsp;<b>NO<sub>3</sub> (mg/l)</b></td>
	    <td>&nbsp;
	        <input type="text" name="no3" id="no3" value="<?php echo $rowSource['asset_no3']; ?>" /></td>
      </tr>
	  -->
	  <tr>
	    <td colspan="2" align="center"><input type="submit" value="EDIT" name="submit" style="font-size: 8pt; font-family: Verdana; border-style: solid; border-width: 1px; font-weight:bold; background:#666666; color:#FFFFFF; width:140px; height:30px" onClick="view_validate()"></td>
  </tr>
  </table>
  </form>
  </div>